package com.easy.query.test.dto.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.dto.TopicSubQueryBlog;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLongTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class TopicSubQueryBlogProxy extends AbstractProxyEntity<TopicSubQueryBlogProxy, TopicSubQueryBlog> {

    private static final Class<TopicSubQueryBlog> entityClass = TopicSubQueryBlog.class;

    public static final TopicSubQueryBlogProxy TABLE = createTable().createEmpty();

    public static TopicSubQueryBlogProxy createTable() {
        return new TopicSubQueryBlogProxy();
    }

    public TopicSubQueryBlogProxy() {
    }

    /**
     * {@link TopicSubQueryBlog#getId}
     */
    public SQLStringTypeColumn<TopicSubQueryBlogProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link TopicSubQueryBlog#getStars}
     */
    public SQLIntegerTypeColumn<TopicSubQueryBlogProxy> stars() {
        return getIntegerTypeColumn("stars");
    }

    /**
     * {@link TopicSubQueryBlog#getTitle}
     */
    public SQLStringTypeColumn<TopicSubQueryBlogProxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * {@link TopicSubQueryBlog#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<TopicSubQueryBlogProxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }

    /**
     * {@link TopicSubQueryBlog#getBlogCount}
     */
    public SQLLongTypeColumn<TopicSubQueryBlogProxy> blogCount() {
        return getLongTypeColumn("blogCount");
    }


    @Override
    public Class<TopicSubQueryBlog> getEntityClass() {
        return entityClass;
    }

    @Override
    public TopicSubQueryBlogProxy createNew() {
        return createTable();
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public TopicSubQueryBlogProxyFetcher FETCHER = new TopicSubQueryBlogProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class TopicSubQueryBlogProxyFetcher extends AbstractFetcher<TopicSubQueryBlogProxy, TopicSubQueryBlog, TopicSubQueryBlogProxyFetcher> {

        public TopicSubQueryBlogProxyFetcher(TopicSubQueryBlogProxy proxy, TopicSubQueryBlogProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link TopicSubQueryBlog#getId}
         */
        public TopicSubQueryBlogProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link TopicSubQueryBlog#getStars}
         */
        public TopicSubQueryBlogProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link TopicSubQueryBlog#getTitle}
         */
        public TopicSubQueryBlogProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link TopicSubQueryBlog#getCreateTime}
         */
        public TopicSubQueryBlogProxyFetcher createTime() {
            return add(getProxy().createTime());
        }

        /**
         * {@link TopicSubQueryBlog#getBlogCount}
         */
        public TopicSubQueryBlogProxyFetcher blogCount() {
            return add(getProxy().blogCount());
        }


        @Override
        protected TopicSubQueryBlogProxyFetcher createFetcher(TopicSubQueryBlogProxy cp, AbstractFetcher<TopicSubQueryBlogProxy, TopicSubQueryBlog, TopicSubQueryBlogProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new TopicSubQueryBlogProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String stars = "stars";
        public static final String title = "title";
        public static final String createTime = "createTime";
        public static final String blogCount = "blogCount";

        private Fields() {
        }
    }
}
